<?php
    require_once("common.inc.php");

    if(isset($_POST))
    {
        $userInfo = $_POST;
        saveUserInfoToFile($userInfo);
    }
  
    //________________________________________________________________
    
    $userInfo = getUserFromPost();
    if (!is_null($userInfo))
    {
        if(is_null(isUserInDB($_POST["email"])))
        {
            saveUser($userInfo); 
        }
        else
        {
            echo("Ooops, error, login is in database");
        }
    }                                                 